# -*- coding: UTF-8 -*-
# filename: yangsy.py
# author by: Face
s = 'pageSize=30&product=EFund&DISCOUNT=&SortColumn=SYL_Y&MobileKey=4a69e1fc7d583fe671ad69c95ae6c2b7%7C%7C945235770232353&BUY=true&appType=ttjj&LevelOne=&version=6.3.2&onFundCache=3&Sort=desc&pageIndex=1&FundType=6&CompanyId=&plat=Android&TOPICAL=&ENDNAV=&LevelTwo=&ISABNORMAL=true&DataConstraintType=0&gToken=ceaf-236567466abfda4e2864831ea5645231&ESTABDATE=6&deviceid=4a69e1fc7d583fe671ad69c95ae6c2b7%7C%7C945235770232353'
def function1(s):
    dict = {}
    s_list = s.split('&')
    # print('并且符号& 分隔之后的值', s_list)
    for row in s_list:
        # print('每个列表元素值', row)
        row_sp = row.split('=')
        # print('每个列表元素值被=号分割之后的值', row_sp,'并且长度为',len(row_sp))
        dict.update({row_sp[0]: row_sp[1]})
    print(dict)

def function2(s):
    s = s.replace('&', ',').replace('=', ': ')
    s1 = eval('"{' + s + '}"')
    print(s1)
function1(s)
function2(s)